home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 21.zip
/
BS1 part 21
/
Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].7z
/
Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].adf
/
rexx.lzh
/
DropShadowBox.pprx
< prev
next >
Wrap
Text File
|
1992-03-13
|
2KB
|
96 lines
/*
@BDropShadowBox @P@ICopyright Gold Disk Inc., February, 1992
This Genie creates a drop shadow box for a selected box.
*/
cr = '0a'x
arg box
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
units = ppm_GetUnits()
if units = 3 then
call ppm_SetUnits(1)
signal on halt
signal on break_c
signal on break_e
signal on break_d
if box = '' then
do
box = ppm_ClickOnBox("Select box for Drop Shadow")
if box = 0 then exit_msg()
end
boxsize = ppm_GetBoxSize(box)
boxwidth = word(boxsize, 1)
boxheight = word(boxsize, 2)
if units = 3 then
do
x = ppm_ConvertUnits(1, 3, boxwidth * .1)
y = ppm_ConvertUnits(1, 3, boxheight * .1)
end
else
do
x = boxwidth * .1
y = boxheight * .1
end
offset = "X:" || x || cr || "Y:" || y
offset = ppm_GetForm("Select Drop Shadow offset..", 8, offset)
if offset = '' then exit_msg()
parse var offset xoffset '0a'x yoffset
if ~(datatype(xoffset, n) & datatype(yoffset, n)) then exit_msg("Invalid Entry")
if units = 3 then
do
xoffset = ppm_ConvertUnits(3, 1, xoffset)
yoffset = ppm_ConvertUnits(3, 1, yoffset)
end
newbox = ppm_CloneBox(box, xoffset, yoffset)
if upper(word(ppm_GetBoxInfo(newbox), 1)) ~= 'EMPTY' then
call ppm_DeleteContents(newbox)
colorlist = ppm_GetColorList()
colorlist = delstr(colorlist, 1, pos('0a'x, colorlist))
color = ppm_SelectFromList("Select Fill Color", 30, 5, 0, colorlist)
if color = '' then exit_msg()
call ppm_SetBoxTransparent(newbox,0)
call ppm_SetBoxTransparent(box,0)
call ppm_BoxToBack(newbox)
call ppm_SetBoxFrame(box, 1)
call ppm_SetBoxFrame(newbox, 1)
call ppm_SetBoxFrameData(newbox, color, color, ppm_GetLineWeight(), ppm_GetLinePattern(), 1)
if ppm_GetWireFrame() then call ppm_ShowStatus("Select Wire Frame mode to see results")
exit_msg()
break_d:
break_e:
break_c:
halt:
call exit_msg("User aborted Genie!")
exit_msg: procedure expose units
do
parse arg message
if message ~= '' then
call ppm_Infrom(1, message,)
call ppm_SetUnits(units)
call ppm_AutoUpdate(1)
exit
end